<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const str = 'aaa bbb 111 5555 abcabcabc';

        console.log(str.match(/a{3}/g));
        console.log(str.match(/5{4}/g));
        console.log(str.match(/1{3}/g));
        console.log(str.match(/b{3}/g));
        console.log(str.match(/\d{3}/g));
        console.log(str.match(/[a-z]{3}/g));
        console.log(str.match(/(abc){3}/g));//






    </script>
</body>

</html>